#include "ic_handler.h"

void user_handler::ic_handler::handle_event(
	boost::shared_ptr<network::message> n) 
{
	if(n->type == network::RECEIVE) {
		boost::shared_ptr<model::dom> node(n->node);
		if(node->name() == "temp") {
			_web->send(_mgr->get_sender(_web)->send(node));
		}
	} else if(n->type == network::DELETE) {
		boost::shared_ptr<user_handler::ic_handler> tmp(_this.lock());
		fire_listener();	// notify collection to remove me
	}
}

